﻿// owner 蒋家伟

#pragma once

// qt
#include <QObject>
#include <QVariant>

// jsdk
#include "OwnerPtr.h"

namespace jsdk
{
    class IDeviceManager;
    class TaskManager;
    class ITask;
    class TaskTransferWorker : public QObject
    {
        Q_OBJECT
    public:
        static OwnerPtr<TaskTransferWorker> create();

        ~TaskTransferWorker() {}
    public slots :
        void onTaskReadyRead(QVariant vTaskId) const;
        void onTaskReadyRead() const;
    private:
        bool taskDistribution(const IDeviceManager& deviceManager, TaskManager& taskManager, ITask& task) const;
    };
}